<h1>Listing <%=h @submitters.length == 1? @submitters.name : "all " %> submitters</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Description</th>
    <th>Administrator?</th>
    <th>Events</th>
  </tr>

<% for submitter in @submitters %>
  <tr>
    <td><%=h submitter.name %></td>
    <td><%=h submitter.description %></td>
    <td><%=h submitter.is_administrator ? "Yes" : "No" %></td>

<!-- render partial: event summary --> <!-- ##rk: this is not going to scale well.... -->
    <td>
        <% submitter.events.each do |e| %>
        <%= link_to e.name, e %>&nbsp;
        <% end %>
    </td>

    <td><%= link_to 'Show', submitter %></td>
    <td><%= link_to 'Edit', edit_submitter_path(submitter) %></td>
    <td><%= link_to 'Destroy', submitter, :confirm => 'Are you sure?', :method => :delete %></td>
<% end %>
</table>

<br />

<%= link_to 'New submitter', new_submitter_path %>

<!-- vi:ts=2:et:sw=2:
-->
